package spark.network.strategy;

import spark.network.protocol.Base;
import spark.network.protocol.Acknowledgement;
import spark.network.protocol.Response;
import spark.network.strategy.IProtocolHandleStrategy;
import spark.utility.OutWrapper;

import java.util.Collection;

public class GenericStrategy implements IProtocolHandleStrategy<Base> {
	@Override
	public void handle(Base packet, OutWrapper<Response> acknowledgement, Collection<Base> responses) {
		if(packet.isReliable()) {
			acknowledgement.value = new Acknowledgement(packet);
		}
	}
}

